{erl_opts, [debug_info]}.

{deps, [{chatterbox, {pkg, ts_chatterbox}},
        ctx,
       {acceptor_pool, {git, "https://gitee.com/fastdgiot/acceptor_pool.git", {tag, "1.0.1"}}},
        gproc]}.

{grpc, [{protos, ["proto"]},
        {service_modules, [{'grpc.health.v1.Health', "grpcbox_health"},
                           {'grpc.reflection.v1alpha.ServerReflection', "grpcbox_reflection"}]},
        {gpb_opts, [{descriptor, true},
                    {module_name_prefix, "grpcbox_"},
                    {module_name_suffix, "_pb"}]}]}.

{profiles,
 [{test, [{erl_opts, [nowarn_export_all]},

          {shell, [{config, "config/test.config"}]},

          {grpc, [{protos, "test/grpcbox_SUITE_data"},
                  {out_dir, "test"},
                  {gpb_opts, [{o, "test"},
                              {descriptor, true},
                              {module_name_suffix, "_pb"}]}]},

          {deps, [opencensus, jsx]}]},

  {interop, [{grpc, [{protos, "interop/proto"},
                     {out_dir, "interop/src"},
                     {gpb_opts, [{o, "interop/src"},
                                 {descriptor, true},
                                 {module_name_suffix, "_pb"}]}]},

             {erl_opts, [{i, "interop/include"}]},

             {extra_src_dirs, ["interop"]},

             {ct_opts, [{config, "interop/config/sys.config"},
                        {dir, "interop/test"}]},

             {shell, [{apps, [grpcbox]},
                      {config, "interop/config/sys.config"}]}]}
 ]}.

{shell, [{apps, [grpcbox]}]}.

{xref_checks, [undefined_function_calls, undefined_functions,
               deprecated_function_calls, deprecated_functions]}.

{project_plugins, [covertool,
                   {grpcbox_plugin, "~> 0.9.0"},
                   rebar3_lint]}.

{cover_enabled, true}.
{cover_opts, [verbose]}.
{cover_export_enabled, true}.
{covertool, [{coverdata_files, ["ct.coverdata"]}]}.

%% create junit xml for circleci
{ct_opts, [{ct_hooks, [cth_surefire]}]}.
